﻿//创建时间: 2010-12-19
//创建作者: 李 城
//功能说明: 用户操作接口
//最后修改: 2010-12-19
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Web;

namespace TRPOP.CMS.Plugin
{
    /// <summary>
    /// 用户操作接口
    /// </summary>
    public interface IAdminUser 
    {
        /// <summary>
        /// 用户登录验证
        /// </summary>
        /// <param name="strUserName"></param>
        /// <param name="strPassword"></param>
        /// <returns></returns>
        bool AdminLogin(string strUserName, string strPassword);

        /// <summary>
        /// 检验用户是否登录
        /// </summary>
        /// <returns></returns>
        bool CheckLogin();

        /// <summary>
        /// 获取用户登录的信息
        /// </summary>
        /// <returns></returns>
        object getUserBaseInfo();


        /// <summary>
        /// 根据用户id获取用户名
        /// </summary>
        /// <param name="strUserName"></param>
        /// <returns></returns>
        string GetAdminNameById(int intUserName);

        /// <summary>
        /// 根据用户id获取用户信息
        /// </summary>
        /// <param name="intid"></param>
        /// <returns></returns>
        object getUserBaseInfo(int intid);
        /// <summary>
        /// 根据验证码枚举值判断用户权限
        /// </summary>
        /// <param name="oPermissionKeys"></param>
        /// <returns></returns>
        bool CheckUserPermission(PermissionKeys.PermissionEnum oPermissionKeys);
        /// <summary>
        /// 根据权限码Key验证当前用户是否有权限
        /// </summary>
        /// <param name="strPermissionKeywords"></param>
        /// <returns></returns>
        bool CheckUserPermission(string strPermissionKeywords);

        /// <summary>
        /// 用户退出登陆
        /// </summary>
        void LoginOut();
        /// <summary>
        /// 根据父ID获取PermissionList
        /// </summary>
        /// <param name="intParentid"></param>
        /// <returns></returns>
        List<object> GetPermissionListByParentId(int intParentid);
        /// <summary>
        /// 获取当前用户可操作的所有节点。
        /// 格式如下：1,2,3,4,5,6 。 如果全部，则为all。
        /// </summary>
        /// <returns></returns>
        string GetEnabledNodeIds();
        /// <summary>
        /// 保存当前用户信息
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        bool SaveUserInfo(object obj);
        /// <summary>
        /// 删除用户
        /// </summary>
        /// <param name="intUserID"></param>
        /// <returns></returns>
        bool DeleteUserInfoById(int intUserID);
        /// <summary>
        /// 获取所有的用户信息
        /// </summary>
        /// <param name="topn"></param>
        /// <param name="condition"></param>
        /// <param name="orderby"></param>
        /// <returns></returns>
        List<object> GetListByConditionForRealPubCount(int topn, string condition, string orderby);
        /// <summary>
        /// 根据条件返回用户 List 
        /// </summary>
        /// <param name="topn"></param>
        /// <param name="condition"></param>
        /// <param name="orderby"></param>
        /// <returns></returns>
        List<object> GetUserListByCondition(int topn, string condition, string orderby);
        /// <summary>
        /// 给当前用户增加节点权限
        /// </summary>
        /// <param name="intNodeId"></param>
        /// <returns></returns>
        bool AddPermissionByNodeId(int intNodeId);
    }
}
